from sqlalchemy import Column, String, Integer, Boolean
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()


class Domain_List(Base):
    __tablename__ = "domain_list"

    id = Column(Integer, primary_key=True)
    domain = Column(String(30))  # 域名
    used = Column(String(20))  # 域名用途
    expir = Column(String(25))  # 过期时间
    owner = Column(String(20))  # 域名所有人
    regist = Column(String(20))  # 注册商
    is_check = Column(Boolean)  # 是否检查此域名
    is_discard = Column(Boolean)  # 是否不关注此域名

    def __repr__(self):
        tpl = "domain_list(id={},domain={},owner={},expir={})"
        return tpl.format(self.id, self.domain, self.owner, self.expir)